#pragma once


#include "math/Vector.hpp"


struct Point
{
    Point() : x(0.0f), y(0.0f), z(0.0f) {}
    Point(double x1, double y1, double z1) : x(x1), y(y1), z(z1) {}
    Point(const Point& p) : x(p.x), y(p.y), z(p.z) { }

    Point& operator=(const Point& p)
    {
        x = p.x;
        y = p.y;
        z = p.z;
        return *this;
    }

    Point& operator+=(const Vector& v)
    {
        x += v.x();
        y += v.y();
        z += v.z();
        return *this;
    }

    Point& operator-=(const Vector& v)
    {
        x -= v.x();
        y -= v.y();
        z -= v.z();
        return *this;
    }

    Point operator+(const Vector& v) const
    {
        return Point(x + v.x(), y + v.y(), z + v.z());
    }

    Vector operator-(const Point& p) const
    {
        return Vector(x - p.x, y - p.y, z - p.z);
    }

    Point operator-(const Vector& v) const
    {
        return Point(x - v.x(), y - v.y(), z - v.z());
    }

    double x;
    double y;
    double z;
};
